﻿package 
{	
	import flash.display.Sprite;
	import flash.display.MovieClip;
	import flash.events.Event;

	public class GamePreloader extends Sprite
	{
		public const LOADED:String = 'LOADED';
		
		private var FStrip:MovieClip;		
		
		public function GamePreloader():void
		{
			FStrip = getChildByName('Strip') as MovieClip;
			Percent = 0;
		}
		
		public function set Percent(APercent:Number):void
		{			
			FStrip.scaleX = APercent;
			if(APercent >= 1)
				dispatchEvent(new Event(LOADED));
		}
	}	
}
